// ResourceImage.h: interface for the ResourceImage class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_RESOURCEIMAGE_H__E73F9CFC_A616_11D2_A454_006097A44215__INCLUDED_)
#define AFX_RESOURCEIMAGE_H__E73F9CFC_A616_11D2_A454_006097A44215__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "Image.h"

class CLASS_DECL_D ResourceImage : public Image  
{
DECLARE_DYNAMIC(ResourceImage)
public:
	ResourceImage(HINSTANCE hinst, LPCTSTR name, UINT type, UINT flags);
	ResourceImage(HINSTANCE hinst, int id, UINT type, UINT flags);
	virtual ~ResourceImage();

	virtual void paint(CDC* pDC, AWTCanvas* canvas);
	virtual CSize getSize();
	virtual BOOL loadImage();
	virtual BOOL isValid()
		{return (m_hImage != NULL);}

protected:
	HANDLE m_hImage;
	HINSTANCE m_hinst;
	LPTSTR m_name;
	UINT m_type;
	UINT m_flags;
	BOOL m_bName;
};

#endif // !defined(AFX_RESOURCEIMAGE_H__E73F9CFC_A616_11D2_A454_006097A44215__INCLUDED_)
